From 4c0cf04688ec42035d7733a5fe3f08b72a0b75c3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tadej=20Borov=C5=A1ak?= Date: Fri, 5 Mar 2010 23:42:25 +0100 Subject: [PATCH] [docs] Move documentation to inline comments: GtkAspectFrame MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611958 Signed-off-by: Javier Jardón --- docs/reference/gtk/tmpl/gtkaspectframe.sgml | 88 --------------------- gtk/gtkaspectframe.c | 46 +++++++++++ 2 files changed, 46 insertions(+), 88 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtkaspectframe.sgml diff --git a/docs/reference/gtk/tmpl/gtkaspectframe.sgml b/docs/reference/gtk/tmpl/gtkaspectframe.sgml deleted file mode 100644 index 25d05e89fd..0000000000 --- a/docs/reference/gtk/tmpl/gtkaspectframe.sgml +++ /dev/null @@ -1,88 +0,0 @@ - -GtkAspectFrame - - -A frame that constrains its child to a particular aspect ratio - - - -The #GtkAspectFrame is useful when you want -pack a widget so that it can resize but always retains -the same aspect ratio. For instance, one might be -drawing a small preview of a larger image. #GtkAspectFrame -derives from #GtkFrame, so it can draw a label and -a frame around the child. The frame will be -"shrink-wrapped" to the size of the child. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Create a new #GtkAspectFrame. - - -@label: Label text. -@xalign: Horizontal alignment of the child within the allocation of -the #GtkAspectFrame. This ranges from 0.0 (left aligned) -to 1.0 (right aligned) -@yalign: Vertical alignment of the child within the allocation of -the #GtkAspectFrame. This ranges from 0.0 (left aligned) -to 1.0 (right aligned) -@ratio: The desired aspect ratio. -@obey_child: If %TRUE, @ratio is ignored, and the aspect - ratio is taken from the requistion of the child. -@Returns: the new #GtkAspectFrame. - -@ratio: The desired aspect ratio. - - - - -Set parameters for an existing #GtkAspectFrame. - - -@aspect_frame: a #GtkAspectFrame -@xalign: Horizontal alignment of the child within the allocation of -the #GtkAspectFrame. This ranges from 0.0 (left aligned) -to 1.0 (right aligned) -@yalign: Vertical alignment of the child within the allocation of -the #GtkAspectFrame. This ranges from 0.0 (left aligned) -to 1.0 (right aligned) -@ratio: The desired aspect ratio. -@obey_child: If %TRUE, @ratio is ignored, and the aspect - ratio is taken from the requistion of the child. - - diff --git a/gtk/gtkaspectframe.c b/gtk/gtkaspectframe.c index db0a839454..beedd19c2c 100644 --- a/gtk/gtkaspectframe.c +++ b/gtk/gtkaspectframe.c @@ -29,6 +29,20 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +/** + * SECTION:gtkaspectframe + * @Short_description: A frame that constrains its child to a particular aspect ratio + * @Title: GtkAspectFrame + * + * The #GtkAspectFrame is useful when you want + * pack a widget so that it can resize but always retains + * the same aspect ratio. For instance, one might be + * drawing a small preview of a larger image. #GtkAspectFrame + * derives from #GtkFrame, so it can draw a label and + * a frame around the child. The frame will be + * "shrink-wrapped" to the size of the child. + */ + #include "config.h" #include "gtkaspectframe.h" #include "gtkprivate.h" @@ -185,6 +199,23 @@ gtk_aspect_frame_get_property (GObject *object, } } +/** + * gtk_aspect_frame_new: + * @label: Label text. + * @xalign: Horizontal alignment of the child within the allocation of + * the #GtkAspectFrame. This ranges from 0.0 (left aligned) + * to 1.0 (right aligned) + * @yalign: Vertical alignment of the child within the allocation of + * the #GtkAspectFrame. This ranges from 0.0 (left aligned) + * to 1.0 (right aligned) + * @ratio: The desired aspect ratio. + * @obey_child: If %TRUE, @ratio is ignored, and the aspect + * ratio is taken from the requistion of the child. + * + * Create a new #GtkAspectFrame. + * + * Returns: the new #GtkAspectFrame. + */ GtkWidget* gtk_aspect_frame_new (const gchar *label, gfloat xalign, @@ -206,6 +237,21 @@ gtk_aspect_frame_new (const gchar *label, return GTK_WIDGET (aspect_frame); } +/** + * gtk_aspect_frame_set: + * @aspect_frame: a #GtkAspectFrame + * @xalign: Horizontal alignment of the child within the allocation of + * the #GtkAspectFrame. This ranges from 0.0 (left aligned) + * to 1.0 (right aligned) + * @yalign: Vertical alignment of the child within the allocation of + * the #GtkAspectFrame. This ranges from 0.0 (left aligned) + * to 1.0 (right aligned) + * @ratio: The desired aspect ratio. + * @obey_child: If %TRUE, @ratio is ignored, and the aspect + * ratio is taken from the requistion of the child. + * + * Set parameters for an existing #GtkAspectFrame. + */ void gtk_aspect_frame_set (GtkAspectFrame *aspect_frame, gfloat xalign, -- 2.30.2